home *** CD-ROM | disk | FTP | other *** search
- /*
- This is a short program to convert the value of edit /70 to the byte
- location.
-
- This source is copyright (c) Perspective Video & Electronics,
- http://www.pvid.com
-
- Permission granted to use, abuse, re-write, distribute, and delete
- this code in any means you wish.
-
- */
-
- #include <conio.h>
- #include <stdio.h>
- #include <iostream.h>
-
- main()
- {
- unsigned long int lines, col, byteoffset;
- int width;
-
-
- printf("Note, the line width is the number you use after edit.\n");
- printf("i.e. edit /70 filename.ext would be a width of 70\n\n");
- printf("Line: ");
- cin >> lines;
- printf("COL : ");
- cin >> col;
- printf("Line width: ");
- cin >> width;
-
- byteoffset = lines * width + col - width - 1;
- printf("Byte location: %ld\n", byteoffset);
-
-
- return(0);
- }
-